local skel = fk.CreateSkill {
  name = "emo__feigong",
  tags = {Skill.Compulsory, Skill.Switch},
}

skel:addEffect(fk.CardUsing, {
  anim_type = "switch",
  can_trigger = function (self, event, target, player, data)
    return player:hasSkill(skel.name) and target == player and data.card.trueName == "slash"
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    if player:getSwitchSkillState(skel.name, true) == fk.SwitchYang then
      data.nullifiedTargets = table.simpleClone(room.players)
      player:drawCards(2, skel.name)
    else
      data.additionalDamage = (data.additionalDamage or 0) + 1
      room:askToDiscard(player, {
        max_num = 2, min_num = 2, include_equip = true, skill_name = skel.name, cancelable = false,
      })
    end
  end,
})

skel:addEffect("targetmod", {
  bypass_distances = function (self, player, skill, card, to)
    return card and card.trueName == "slash" and
    player:hasSkill(skel.name) and player:getSwitchSkillState(skel.name) == fk.SwitchYang
  end,
})


Fk:loadTranslationTable{
  ["emo__feigong"] = "非攻",
  [":emo__feigong"] = "锁定技，转换技，你使用【杀】时，阳：无距离限制，无效并摸两张牌；阴：伤害+1并弃两张牌。",
}


return skel
